package com.zhijiaoyun.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public class ShoppingCart implements Serializable {
	private static final long serialVersionUID = 7096085103712424560L;

	private Long cartId;

	private Long goodsId;

	private Integer goodsType;

	private Integer amount;

	private Long userId;

	private Date createTime;

	public ShoppingCart() {
		super();
	}

	public ShoppingCart(Long goodsId, Integer goodsType, Integer amount, Long userId) {
		super();
		this.goodsId = goodsId;
		this.goodsType = goodsType;
		this.amount = amount == null ? 1 : amount;
		this.userId = userId;
		this.createTime = new Date();
	}

	public Long getCartId() {
		return cartId;
	}

	public void setCartId(Long cartId) {
		this.cartId = cartId;
	}

	public Long getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(Long goodsId) {
		this.goodsId = goodsId;
	}

	public Integer getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(Integer goodsType) {
		this.goodsType = goodsType;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}